﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Globalization;

namespace Kelper.Infrastructure.Helpers
{
    public static class DoubleExtensions
    {
        public static string PercentageDisplay(this double d)
        {
            return (d * 100).ToString("0") + "%";
        }

        public static string CssDecimal(this double d)
        {
            CultureInfo ci = new CultureInfo("en-GB");
            ci.NumberFormat.NumberDecimalSeparator = ".";

            return d.ToString("0.00", ci.NumberFormat);
        }
    }
}